//
//  GWILView.m
//  GiftWanted
//
//  Created by lanou on 15/11/7.
//  Copyright © 2015年 陈文杰. All rights reserved.
//

#import "GWILView.h"

@implementation GWILView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/
- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        CGFloat w = frame.size.width;
        CGFloat h = frame.size.height;
        _img = [[UIImageView alloc] initWithFrame:CGRectMake(5, 0, h, h)];
        _label = [[UILabel alloc] initWithFrame:CGRectMake(h+5, 0, w-h-10, h)];
        _label.font = [UIFont systemFontOfSize:12];
        _label.textColor = [UIColor whiteColor];
        
        [self addSubview:_img];
        [self addSubview:_label];
    }
    return self;
}

@end
